package com.chen.demoa1.controller;



import com.chen.demoa1.bean.Demo;
import com.chen.demoa1.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/demo")
public class DemoController {


    @Autowired
    private DemoService demoService;

    @RequestMapping("/test")
    public void DemoTest(){
        List<Demo> list=demoService.findAll();
        System.out.println(list);
    }
    @RequestMapping("/test1")
    public void DemoTest1(){
        List<Demo> list=demoService.findAll1();
        System.out.println(list);
    }
}
